<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <base href="<?php echo (C("BASE")); ?>">
    <link rel="stylesheet" type="text/css" href="ui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="css/icon.css">  
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <script type="text/javascript" src="ui/jquery.min.js"></script>     
    <script type="text/javascript" src="ui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="ui/locale/easyui-lang-zh_CN.js"></script> 
    <script src="layer/layer.js"></script>   
    <title>后台管理</title>     
</head>
<body>

<!-- 新增分类 -->

 <form method="post">

<div><label>三级分类</label>
<input type="text" name="title" class="easyui-textbox"/>
</div>
<div>
<label>一级分类</label>
<select class="easyui-combobox" name="pid">
<option value="0">二级分类</option>
<?php if(is_array($menus)): foreach($menus as $key=>$v): ?><option value="<?php echo ($key); ?>"><?php echo ($v); ?></option><?php endforeach; endif; ?>
</select>
</div>
<div>
<label>操作</label>
<select class="easyui-combobox" name="aid">
<option value="0">无</option>
<?php if(is_array($actions)): foreach($actions as $key=>$v): ?><option value="<?php echo ($key); ?>"><?php echo ($v); ?></option><?php endforeach; endif; ?>
</select>
</div>
<div><label>参数</label>
<input type="text" name="param" class="easyui-textbox"/>
</div>
<div><label>排序</label>
<input type="text" name="sort" class="easyui-textbox"/>
</div>
<p class="err"><?php echo ($errstr); ?></p>
<input type="submit" value="提交" class="easyui-linkbutton" data-options="width:'70'"/>
</form>
<script>
//alert(1);
$('#all').click(function(){  //全选按钮05-29-1109 58分
	
	var result=$(this).prop('checked'); //获取当前全选按钮的状态 true false
	$('.action input').prop('checked',result);  //将所有的input的状态改成和全选按钮一样
});

$('.action input').click(function(){ //其他input
	var input=$('.action input'); //获取所有操作有关的checkbox
	var ck_input=$('.action input:checked'); //获取所有操作有关的 被选中的checkbox
	
	 
	if(input.length==ck_input.length){   //通过判断所有的和被选中的个数来设置全选框的状态 
		$('#all').prop('checked',true);
	}else{
		$('#all').prop('checked',false);
	}
});

</script>


</body>
</html>